// components/detailComment/detailComment.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    comment: {
      type: Object,
      value: null,
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    flagState: null, //是否评论状态
  },
  attached() {
    setTimeout(() => {
      // console.log(this.properties.comment);
      this.replyData(this.properties.comment)
    }, 2000)
  },
  /**
   * 组件的方法列表
   */
  methods: {
    replyData(k) {
      let tempState = []
      for (let i = 0; i < k.length; i++) {
        // console.log('回复状态---->',k[i]);
        tempState.push(k[i].hasOwnProperty('replied'))
        this.setData({
          flagState: tempState
        })
      }
      // console.log(tempState);
    }
  }
})